﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcContrib.UI.Grid;
using XDerive.XStudio.Support.SupportAppI.User;

namespace WebStudio.Mvc.Core.Extensions
{
    /// <summary>
    /// MvcContrib.UI.Grid扩展函数
    /// </summary>
    public static class GridExtension
    {
        /// <summary>
        /// 权限验证函数
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="column"></param>
        /// <param name="powerID"></param>
        /// <returns></returns>
        public static IGridColumn<T> CheckPower<T>(this IGridColumn<T> column, int powerID)
        {
            column.Visible(UserAppI.CheckPower(powerID));
            return column;
        }
    }
}
